﻿@model Venue
@{
    ViewBag.Title = "Delete Venue";
    var modules = Model.Modules.ToList();
}
@if (modules.Count == 0)
{
    <p>Please confirm the deletion of @Model.Name.</p>
    using (Html.BeginForm("Delete", "Venue", new { id = Model.Id }, FormMethod.Get))
    {
        <p><input type="submit" value="Delete" /> @Html.ActionLink("Cancel", "Index")</p>
    }
}
else
{
    <p>Unable to delete @(Model.Name), please ensure that no module are hosted at this venue. Please modify the following modules first.</p>
    <ul>
        @foreach (var m in modules)
        {
            <li>@m.Title</li>
        }
    </ul>
}
